package com.data.monitoring.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件夹状态记录
 * </p>
 *
 * @author HanYiMing
 * @since 2025-05-28
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("folder_status")
@ApiModel(value = "FolderStatus对象", description = "文件夹状态记录")
public class FolderStatus extends Model<FolderStatus> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "status_id", type = IdType.AUTO)
    private Long statusId;

    @ApiModelProperty("监控文件夹ID")
    @TableField("folder_id")
    private Integer folderId;

    @ApiModelProperty("文件夹名称")
    @TableField("folder_name")
    private String folderName;

    @ApiModelProperty("完整路径")
    @TableField("full_path")
    private String fullPath;

    @ApiModelProperty("最后修改时间")
    @TableField("modify_time")
    private Date modifyTime;

    @ApiModelProperty("文件夹大小(字节)")
    @TableField("size")
    private Long size;

    @ApiModelProperty("包含文件数")
    @TableField("file_count")
    private Integer fileCount;

    @ApiModelProperty("包含子文件夹数")
    @TableField("subfolder_count")
    private Integer subfolderCount;

    @ApiModelProperty("检查时间")
    @TableField("check_time")
    private Date checkTime;

    @ApiModelProperty("文件")
    @TableField(exist = false)
    private MonitoredFolders folders;

    @Override
    public Serializable pkVal() {
        return this.statusId;
    }
}
